#{extends 'simpleTemplate.html' /}
<title>&{'Users_change_name_header'}</title>
<script>
    function saveNewName(newName) {
        $.get("/changeName", {"oldName": "${oldName}", "newName": newName}, function () {
            document.location.href = "/userList";
        })
    }
</script>
<div class="content">
    <div class="content-header">
        <h3>&{'Users_change_name'}</h3>
    </div>


    <div class="content-body">
        <p>&{'Users_change_name_old_name'} ${oldName}</p>
        <input type="text" id="new-name"/>
        <br>
        <input type="button" value="&{'Users_change_save'}" onclick="saveNewName($('#new-name').val())"/>
        </br>
    </div>

</div>